package MainTest;

/**
 * Created by xuyi on 2017/2/13.
 */
public class MultiplyArray {

    public int[] multiply(int[] A) {

        int len = A.length;
        int[] result = new int[len];
        int rst = 1;

        for (int i = 0; i < len; i++) {
            for (int j = 0; j < len; j++) {
                if (i == j) {
                    continue;
                }
                rst *= A[j];
            }
            result[i] = rst;
            rst = 1;
        }
        return result;
    }


    public static void main(String[] args) {

        int intarr[][] = new int[5][6];
        int [] intarrb [] = new int[5][6];




        int[] a = {1, 2, 3, 4};

        MultiplyArray multiplyArray = new MultiplyArray();

        int[] multiply = multiplyArray.multiply(a);

        for (int i = 0; i < multiply.length; i++) {
            System.out.println(multiply[i]);
        }
    }


}
